package cn.hhy.hrm.Exception;

public enum ErrorCode {
    //不可为空的错误码
    CODE_200_PARAM_VALID(200,"操作成功！"),
    CODE_400_PARAM_VALID(400001,"参数校验错误！"),
    CODE_400_VERIFICATION_CODE_REQUEST_TOO_FAST(400005,"验证码发送过快！"),
    CODE_500_PARAMETER_PHONE(500001,"手机参数格式不和规！"),
    CODE_500_PARAMETER_EMAIL(500002,"邮箱参数格式不和规！"),
    CODE_500_SYSTEM_ERROR(500,"内部错误，请联系管理员！"),
    CODE_400002_PWD_EQUAL(400002,"两次密码不一致！"),
    CODE_400_VERIFICATION_CODE_ERROR(400004,"验证码错误！"),
    CODE_500_COURSENAME_REPEAT(500003,"课程名称重复！"),
    CODE_400_ILLEGAL_REQUEST(400003,"非法请求！"),
    CODE_400_MOBILE_CODE_ISNULL(400006,"短信验证码不为空！"),
    CODE_400_MOBILE_CODE_ERROR(400007,"短信验证码错误！"),
    CODE_400_MOBILE_REPEAT(400008,"手机号码已注册！"),
    CODE_400_REGISTRATION_FAILED(400009,"信息保存失败！");
    private int code;
    private String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "ErrorCode{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}

